package com.example.demo.controller;
import com.example.demo.pojo.PublicFields;
import com.example.demo.pojo.dto.ComponentDTO;

import com.example.demo.service.ITestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
//@Api(tags = "产品接口")
@RestController
@RequiredArgsConstructor
public class test {
    @Autowired private ITestService tempService;
//    @ApiOperation("测试接口")
    @PostMapping("/test")
    public String test(){
        return "111";
    }
//    @ApiOperation("新增产品接口")
    @PostMapping("/addComponent")
    public void addComponent(@RequestBody ComponentDTO componentDTO){
        tempService.test(componentDTO, PublicFields.newInstance());
    }
}
